package com.lsq.tucao.express.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lsq.tucao.express.bean.po.TucaoDetail;
import org.apache.ibatis.annotations.Update;

/**
* @Author linshouqiang
* @Description 数据表tucao_detail对应的mapper
* @Date 2020/11/24 18:19
*/
public interface TucaoDetailMapper extends BaseMapper<TucaoDetail> {

    @Update("update tucao_detail set like_num=like_num+1 where tucao_id=#{tucaoId}")
    Integer likeTucao(Long tucaoId);

    @Update("update tucao_detail set like_num=like_num-1 where tucao_id=#{tucaoId}")
    Integer cancelLikeTucao(Long tucaoId);

    @Update("update tucao_detail set discuss_num=discuss_num+1 where tucao_id=#{tucaoId}")
    Integer discussTucao(Long tucaoId);

}
